﻿CREATE TABLE [dbo].[PropertyDefinitions] (
    [PropertyDefinitionId] BIGINT NOT NULL,
    [PropertyKey]          NVARCHAR (255)  NOT NULL,
    [PropertyName]         NVARCHAR (255)  NOT NULL,
    [PropertyDescription]  NVARCHAR (1000) NOT NULL,
    [PropertyDisplayName]  NVARCHAR (255)  NOT NULL,
    [DataType]             BIGINT          CONSTRAINT [DF_PropertyDefinitions_DataType] DEFAULT ((1)) NOT NULL,
    CONSTRAINT [PK_PropertyDefinitions] PRIMARY KEY CLUSTERED ([PropertyDefinitionId] ASC),
    CONSTRAINT [FK_PropertyDefinitions_DataTypes] FOREIGN KEY ([DataType]) REFERENCES [dbo].[DataTypes] ([DataTypeId])
);


GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_PropertyDefinitions]
    ON [dbo].[PropertyDefinitions]([PropertyKey] ASC);

